<?php

/**
 *分享页面
 */
namespace app\home\controller;
use think\Controller;
use think\Db;
/**
 * 网站入口控制器
 */
//const LABEL_FONT_PATH_DEFAULT = '';
class Myscan extends Controller{

    //我的分享
    public function myscan(){
       if(empty(session("_user_uid_"))){
         $this->redirect('outlo/index');
       }
       $name = Db::table("ys_user")->where("uid",session("_user_uid_")["uid"])->find();
       $url =  "http://".$_SERVER['HTTP_HOST'].url("myscan/inscan")."?token=" .$name["uid"];
       $this->assign('url',$url);
       return view("myscan/myscan");
    }
    //分享进入
    public function inscan(){
        $token = request()->get("token");
        session("token",$token);
        $this->redirect('index/index');
    }
  
 
}

